<template>
  <div>
    <span>用户名 </span><input type="text" name="username" /><br />
    <span style="margin-right: 15px">密码 </span
    ><input type="text" name="password" />

    <div style="margin-top: 20px">
      <button style="margin-right: 20px">登录</button>
      <button @click="btn">注册</button>
    </div>
  </div>
</template>
 
<script>
export default {
  components: {},
  props: {},
  data() {
    return {}
  },
  created() {},
  methods: {
    btn(){
      // 方式1: path跳转
      this.$router.push({
        path:"/register",
        name:'Register',
        query:{
          usname:'wang',
        },
        params:{
          usname:'wang'
        }
      })
      // 简易写法
  // this.$router.push('/register/kunkun')
    },
  }
}
</script>

<style scoped>
</style>